function handles = renameGroup(handles)
% renameGroup
%
% Editing:
% gs may 2005
% -----------------------------------------------

% prompt user for new name
newName = inputdlg('New name:');
newName = newName{1};

% determine which group was selected
groupVal = get(handles.groupList, 'Value');

% rename as needed in the handles structure
listsAndExpts = handles.analysis.mapAverager.cellLists.currentFile.listsAndExpts;

listsAndExpts{groupVal,1} = newName;
% listsAndExpts(groupVal,1) = newName;

% update the groupList listbox
set(handles.groupList, 'String', listsAndExpts(:,1));

% store new name within the handles structure
handles.analysis.mapAverager.cellLists.currentFile.listsAndExpts = listsAndExpts;

% save
handles = saveListFile(handles);

